package work;

public class StringBuilderDemo {
    public static void main(String[] args) {
        String str = "\\";
        System.out.println(str);

        /*String str = "a";
        long start = System.currentTimeMillis();
        for(int i=0;i<50000;i++){
            str += i;
        }
        long end = System.currentTimeMillis();
        System.out.println("执行完毕:"+(end-start)+"ms");

        StringBuilder builder = new StringBuilder("a");
        long startB = System.currentTimeMillis();
        for(int i=0;i<5000000;i++){
            builder.append(i);
        }
        long endB = System.currentTimeMillis();
        System.out.println("执行完毕:"+(endB-startB)+"ms");*/

       /* String str = "吃饱喝饱，一路走好";
        StringBuilder builder = new StringBuilder(str);

        builder.append("在此参上");
        System.out.println(builder);

        builder.replace(2,4,"喝足");
        System.out.println(builder);

        builder.delete(9,13);
        System.out.println(builder);

        builder.insert(0,"说：");
        System.out.println(builder);*/


        /*StringBuilder builder1 = new StringBuilder();
        StringBuilder builder2 = new StringBuilder("abc");

        String str1 = "aaa";
        StringBuilder builder3 = new StringBuilder(str1);

        String str2 = builder2.toString();*/
    }
}
